const store = {
  state: {
    username: 'Jack',
    userAge: 20
  },
  getters: {
    sumAge(state, getters, rootState) {
      console.log('getters是全局通用的');
      return state.userAge + rootState.age
    }
  }
}
export default store